<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表渲染</title>
</head>
<body>


<ul id="app">
    <li v-for="(item,index) of items">
        {{ParentMessage}}-{{index}} :{{item.message}}
    </li>
</ul>
<script type="text/javascript" src="source/vue.js"></script>
<script type="text/javascript">
    //用 v-for 把一个数组对应为一组元素
    var app = new Vue({
        el: "#app",
        data: {
            ParentMessage: 'Parent',
            items: [
                {message: "Foo"},
                {message: "bar"},
                {message: "Net"},
            ]
        }
    })
</script>
</body>
</html>